<template>
    <div id="app" class="resource">
        <div class="main">
            <div class="nav">
                <div>

                </div>
                <div class="addRole" @click="addClick">
                    <div><span class="glyphicon glyphicon-download-alt"></span>添加顶级资源</div>
                </div>
            </div>
            <div class="cont" v-loading="loading" element-loading-text="拼命加载中">
                <div class="Conttree">
                    <div class="allConttree" @click="allClick">显示所有</div>
                    <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick" accordion @node-expand="handleNodeExpand" @node-collapse="handleNodeCollapse"></el-tree>
                </div>
                <div class="ContMain">
                    <ul>
                        <li class="firstLi">
                            <div>名称</div>
                            <div>Code</div>
                            <div>Path</div>
                            <div>创建时间</div>
                            <div>操作</div>
                        </li>
                        <li v-if="isDatasNull" class="nullLi">
                            <div>暂时没有数据</div>
                        </li>
                        <li v-else class="dataLi" v-for="(item,index) in items">
                            <div>{{item.name}}</div>
                            <div>{{item.code}}</div>
                            <div>{{item.path}}</div>
                            <div>{{item.createDate | ctimeFun}}</div>
                            <div>
                                <small @click="findClick(index)">
                                  <span class="glyphicon glyphicon-zoom-in"></span>查看
                                </small>
                                <small @click="updateClick(index)">
                                   <span class="glyphicon glyphicon-edit"></span>修改
                                </small>
                                <small @click="addSonsClick(index)">
                                   <span class="glyphicon glyphicon-edit"></span>增加下级资源
                                </small>
                                <small @click="deleteClick(index)">
                                    <template>
                                      <el-button class="elbut" type="text"><span class="glyphicon glyphicon-trash"></span>删除</el-button>
                                    </template>
                               </small>
                            </div>
                        </li>

                        <li class="lastLi">
                            <div class="lastSel">
                                <el-pagination class="elLastPag" @size-change="handleSizeChange" @current-change="handleCurrentChange" :page-sizes="[10, 20, 30, 40]"
                                    :page-size="pageSizeNum" :current-page="currentPage" layout="total, sizes, prev, pager, next"
                                    :total="totalNum">
                                    </el-pagination>
                            </div>
                            <div class="lastPag">
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <!--添加资源-->
        <div :class="{addRolePopup:isAddRolePopup,addRoleShow:isAddRoleShow}">
            <transition name="slide-fade">
                <div class="addRoleP" v-show="addShow" v-loading="adding" element-loading-text="正在添加中...">
                    <div class="addPTitle">添加资源</div>
                    <ul class="addPUl">
                        <li class="addPLi">
                            <div>角色名称：</div>
                            <div><input type="text" v-model="addObj.name" placeholder="请输入资源名称"></div>
                        </li>
                        <li class="addPLi">
                            <div>Code：</div>
                            <div><input type="text" v-model="addObj.code" placeholder="请输入资源Code"></div>
                        </li>
                        <li class="addPLi">
                            <div>Path：</div>
                            <div><input type="text" v-model="addObj.path" placeholder="请输入资源Path"></div>
                        </li>
                        <li class="butLi">
                            <div @click="cancelClick">
                                取消
                            </div>
                            <div @click="addRoleClick">
                                确认
                            </div>
                        </li>
                    </ul>
                </div>
            </transition>
        </div>
        <!--展示资源-->
        <div :class="{updateRolePopup:isupdateRolePopup,updateRoleShow:isupdateRoleShow}">
            <transition name="slide-fade">
                <div class="updateRoleP" v-show="updateShow" v-loading="adding" element-loading-text="正在获取中...">
                    <div class="addPTitle">资源详情</div>
                    <ul class="addPUl">
                        <li class="addPLi">
                            <div>角色名称：</div>
                            <div>{{updateObj.name}}</div>
                        </li>
                        <li class="addPLi">
                            <div>Code：</div>
                            <div>{{updateObj.code}}</div>
                        </li>
                        <li class="addPLi">
                            <div>Path：</div>
                            <div>{{updateObj.path}}</div>
                        </li>
                        <li class="addPLi">
                            <div>资源父Id：</div>
                            <div>{{updateObj.parentId}}</div>
                        </li>
                        <li class="addPLi">
                            <div>本身Id：</div>
                            <div>{{updateObj.id}}</div>
                        </li>
                        <li class="addPLi">
                            <div>创建时间：</div>
                            <div>{{updateObj.createDate | ctimeFun}}</div>
                        </li>
                        <li class="butLi">
                            <div @click="cancelClick">
                                确认
                            </div>
                        </li>
                    </ul>
                </div>
            </transition>
        </div>
        <!--修改资源-->
        <div :class="{findRolePopup:isfindRolePopup,findRoleShow:isfindRoleShow}">
            <transition name="slide-fade">
                <div class="findRoleP" v-show="findShow" v-loading="adding" element-loading-text="正在修改中...">
                    <div class="addPTitle">修改资源</div>
                    <ul class="addPUl">
                        <li class="addPLi">
                            <div>角色名称：</div>
                            <div><input type="text" v-model="findObj.name" placeholder="请输入资源名称"></div>
                        </li>
                        <li class="addPLi">
                            <div>Code：</div>
                            <div><input type="text" v-model="findObj.code" placeholder="请输入资源Code"></div>
                        </li>
                        <li class="addPLi">
                            <div>Path：</div>
                            <div><input type="text" v-model="findObj.path" placeholder="请输入资源Path"></div>
                        </li>
                        <li class="butLi">
                            <div @click="cancelClick">
                                取消
                            </div>
                            <div @click="updateRoleClick">
                                确认
                            </div>
                        </li>
                    </ul>
                </div>
            </transition>
        </div>
    </div>
</template>

<script>
    import { mapActions } from 'vuex'
    export default {
        name: 'resource',
        data() {
            return {
                keyArrs: [],
                isAddRolePopup: true,
                isAddRoleShow: true,
                addShow: false,
                isupdateRolePopup: true,
                isupdateRoleShow: true,
                updateShow: false,
                isfindRolePopup: true,
                isfindRoleShow: true,
                findShow: false,
                data: [],
                defaultProps: {
                    children: 'children',
                    label: 'name'
                },
                loading: false,
                isDatasNull: true,
                items: [],
                itemHeads: {},
                pageSizeNum: 10,
                currentPage: 1,
                totalNum: 0,
                selectOneInd: '999999',
                selectTwoInd: '',
                addObj: {
                    name: '',
                    code: '',
                    path: '',
                    parentId: ''
                },
                adding: false,
                // 详情对象
                updateObj: {
                    name: '',
                    code: '',
                    path: '',
                    parentId: '',
                    createDate: '',
                    id: ''
                },
                // 修改对象
                findObj: {
                    name: '',
                    code: '',
                    path: '',
                    id: ''
                },
                oldName: '',
                oldArrs: [],
                sonOrfor: 1,
                addIndex: ''
            }
        },
        created: function () {
            var self = this
            self.loading = true
            // 获取所用用户信息
            self.getFindResourceTree({
            }).then((data) => {
                self.loading = false
                console.log(data)
                if (data.code === 200) {
                    self.data = data.data;
                    if (data.data.length > 0) {
                        self.items = data.data
                        self.totalNum = data.data.length
                        self.isDatasNull = false
                    } else {
                        self.isDatasNull = true
                    }
                }
            }).catch(msg => {
                console.log(msg)
                switch (msg.status) {
                    case 500:
                        break;
                    case 504:
                        break;
                    default:
                        break;
                }
            })
        },
        filters: {
            ctimeFun: function (val) {
                var now = new Date(val)
                var year = now.getYear() - 100;
                var month = now.getMonth() + 1;
                month = month > 9 ? month : "0" + month
                var date = now.getDate();
                date = date > 9 ? date : "0" + date
                var hour = now.getHours();
                hour = hour > 9 ? hour : "0" + hour
                var minute = now.getMinutes();
                minute = minute > 9 ? minute : "0" + minute
                return "20" + year + "-" + month + "-" + date + "   " + hour + ":" + minute;
            }
        },
        methods: {
            // 显示所有
            allClick() {
                var self = this
                self.loading = true
                // 获取所用用户信息
                self.getFindResourceTree({
                }).then((data) => {
                    self.loading = false
                    console.log(data)
                    if (data.code === 200) {
                        self.data = data.data;
                        if (data.data.length > 0) {
                            self.items = data.data
                            self.isDatasNull = false
                        } else {
                            self.isDatasNull = true
                        }
                    }
                }).catch(msg => {
                    console.log(msg)
                    switch (msg.status) {
                        case 500:
                            break;
                        case 504:
                            break;
                        default:
                            break;
                    }
                })
            },
            handleNodeCollapse(data) {
                var self = this
                console.log(data)
                var fars = []
                var sons = []
                fars.push(data)
                sons = data.children
                self.items = fars.concat(sons)
                self.totalNum = self.items.length
                var dataArr = self.data
                dataArr.forEach(function (ele, ind) {
                    if (data.name == ele.name) {
                        self.selectOneInd = ind
                    }
                })
                console.log(self.selectOneInd)
            },
            handleNodeExpand(data, node) {
                var self = this
                var fars = []
                var sons = []
                fars.push(data)
                sons = data.children
                self.items = fars.concat(sons)
                self.totalNum = self.items.length
                var dataArr = self.data
                dataArr.forEach(function (ele, ind) {
                    if (data.name == ele.name) {
                        self.selectOneInd = ind
                    }
                })
                console.log(self.selectOneInd)
            },
            // 树形结构按钮
            handleNodeClick(data) {
                var self = this
                if (self.oldName == data.name) {
                } else {
                    var dataArr = self.data
                    var fars = []
                    var sons = []
                    dataArr.forEach(function (ele, ind) {
                        if (data.name == ele.name) {
                            if (dataArr[ind].children) {
                            } else {
                                self.items = []
                                self.items.unshift(dataArr[ind])
                                self.totalNum = self.items.length
                            }
                        }
                    })
                }
                self.oldName = data.name
            },
            // 修改每页显示页数
            handleSizeChange() {
            },
            // 点击分页
            handleCurrentChange() {
            },
            // 添加资源
            addRoleClick() {
                var self = this
                self.adding = true
                if (self.sonOrfor == 1) {
                    // 添加资源信息
                    self.getAddResource(
                        self.addObj
                    ).then((data) => {
                        console.log(data)
                        self.adding = false
                        if (data.code === 200) {
                            self.$message({
                                type: 'success',
                                message: '添加成功'
                            });
                            self.addObj.name = ''
                            self.addObj.code = ''
                            self.addObj.path = ''
                            self.addObj.parentId = ''
                            self.isAddRoleShow = true
                            self.addShow = false
                            self.loading = true
                            self.getFindResourceTree({
                            }).then((data) => {
                                self.loading = false
                                console.log(data)
                                if (data.code === 200) {
                                    self.data = data.data;
                                    if (data.data.length > 0) {
                                        self.items = data.data
                                        self.totalNum = data.data.length
                                        self.isDatasNull = false
                                    } else {
                                        self.isDatasNull = true
                                    }
                                }
                            }).catch(msg => {
                                console.log(msg)
                                switch (msg.status) {
                                    case 500:
                                        break;
                                    case 504:
                                        break;
                                    default:
                                        break;
                                }
                            })
                        }
                    }).catch(msg => {
                        console.log(msg)
                        switch (msg.status) {
                            case 500:
                                break;
                            case 504:
                                break;
                            default:
                                break;
                        }
                    })
                } else {
                    // 添加资源信息
                    self.addObj.parentId = self.items[self.addIndex].id
                    self.getAddResource(
                        self.addObj
                    ).then((data) => {
                        console.log(data)
                        self.adding = false
                        if (data.code === 200) {
                            self.$message({
                                type: 'success',
                                message: '添加成功'
                            });
                            self.addObj.name = ''
                            self.addObj.code = ''
                            self.addObj.path = ''
                            self.addObj.parentId = ''
                            self.isAddRoleShow = true
                            self.addShow = false
                            self.loading = true
                            self.getFindResourceTree({
                            }).then((data) => {
                                self.loading = false
                                console.log(data)
                                if (data.code === 200) {
                                    self.data = data.data;
                                    if (data.data.length > 0) {
                                        self.items = data.data
                                        self.totalNum = data.data.length
                                        self.isDatasNull = false
                                    } else {
                                        self.isDatasNull = true
                                    }
                                }
                            }).catch(msg => {
                                console.log(msg)
                                switch (msg.status) {
                                    case 500:
                                        break;
                                    case 504:
                                        break;
                                    default:
                                        break;
                                }
                            })
                        }
                    }).catch(msg => {
                        console.log(msg)
                        switch (msg.status) {
                            case 500:
                                break;
                            case 504:
                                break;
                            default:
                                break;
                        }
                    })
                }

            },
            // 添加资源弹出框
            addClick() {
                this.isAddRoleShow = false
                this.addShow = true
                this.sonOrfor = 1
            },
            addSonsClick(index) {
                this.isAddRoleShow = false
                this.addShow = true
                this.addIndex = index
                this.sonOrfor = 2
            },
            // 查看资源详情
            findClick(index) {
                this.isupdateRoleShow = false
                this.updateShow = true
                var self = this
                self.adding = true
                self.getFindOneResource({
                    id: self.items[index].id,
                }).then((data) => {
                    console.log(data)
                    self.adding = false
                    if (data.code === 200) {
                        self.updateObj = data.data
                    }
                }).catch(msg => {
                    console.log(msg)
                    switch (msg.status) {
                        case 500:
                            break;
                        case 504:
                            break;
                        default:
                            break;
                    }
                })
            },
            // 修改资源
            updateClick(index) {
                this.isfindRoleShow = false
                this.findShow = true
                this.findObj.id = this.items[index].id
            },
            // 修改资源
            updateRoleClick() {
                var self = this
                self.adding = true
                // 修改资源信息
                console.log(self.findObj.name)
                self.getUpdateResource(
                    self.findObj
                ).then((data) => {
                    console.log(data)
                    self.adding = false
                    if (data.code === 200) {
                        self.$message({
                            type: 'success',
                            message: '修改成功'
                        });
                        self.findObj.name = ''
                        self.findObj.code = ''
                        self.findObj.path = ''
                        self.isfindRoleShow = true
                        self.findShow = false
                        self.loading = true
                        self.getFindResourceTree({
                        }).then((data) => {
                            self.loading = false
                            console.log(data)
                            if (data.code === 200) {
                                self.data = data.data;
                                if (self.selectOneInd == 999999) {
                                    self.items = data.data
                                    if (data.data.length > 0) {
                                        self.isDatasNull = false
                                    } else {
                                        self.isDatasNull = true
                                    }
                                } else {
                                    if (data.data[self.selectOneInd].children) {
                                        var fars = []
                                        var sons = []
                                        fars.push(data.data[self.selectOneInd])
                                        sons = data.data[self.selectOneInd].children
                                        self.items = fars.concat(sons)
                                        self.isDatasNull = false
                                    } else {
                                        self.isDatasNull = true
                                    }
                                }
                            }
                        }).catch(msg => {
                            console.log(msg)
                            switch (msg.status) {
                                case 500:
                                    break;
                                case 504:
                                    break;
                                default:
                                    break;
                            }
                        })
                    }
                }).catch(msg => {
                    console.log(msg)
                    switch (msg.status) {
                        case 500:
                            break;
                        case 504:
                            break;
                        default:
                            break;
                    }
                })
            },
            // 删除资源
            deleteClick(index) {
                var self = this
                var self = this
                var nameStr = "此操作将删除 " + self.items[index].name + " 该资源,是否继续 ?"
                this.$confirm(nameStr, '提示', {
                    cancelButtonText: '取消',
                    confirmButtonText: '确定',
                    type: 'warning'
                }).then(() => {
                    self.getDelResource({
                        id: self.items[index].id,
                    }).then((data) => {
                        console.log(data)
                        self.loading = true
                        self.getFindResourceTree({
                        }).then((data) => {
                            self.loading = false
                            console.log(data)
                            if (data.code === 200) {
                                self.data = data.data;
                                if (self.selectOneInd == 999999) {
                                    self.items = data.data
                                    if (data.data.length > 0) {
                                        self.isDatasNull = false
                                    } else {
                                        self.isDatasNull = true
                                    }
                                } else {
                                    if (data.data[self.selectOneInd].children) {
                                        var fars = []
                                        var sons = []
                                        fars.push(data.data[self.selectOneInd])
                                        sons = data.data[self.selectOneInd].children
                                        self.items = fars.concat(sons)
                                        self.isDatasNull = false
                                    } else {
                                        self.isDatasNull = true
                                    }
                                }
                            }
                        }).catch(msg => {
                            console.log(msg)
                            switch (msg.status) {
                                case 500:
                                    break;
                                case 504:
                                    break;
                                default:
                                    break;
                            }
                        })
                    }).catch(msg => {
                        console.log(msg)
                        switch (msg.status) {
                            case 500:
                                break;
                            case 504:
                                break;
                            default:
                                break;
                        }
                    })
                }).catch(() => {
                    this.$message({
                        type: 'info',
                        message: '已取消删除'
                    });
                });
            },
            // 取消弹出框
            cancelClick() {
                this.isAddRoleShow = true
                this.addShow = false
                this.isupdateRoleShow = true
                this.updateShow = false
                this.isfindRoleShow = true
                this.findShow = false
                this.updateObj.name = ''
                this.updateObj.code = ''
                this.updateObj.path = ''
                this.updateObj.parentId = ''
                this.updateObj.createDate = ''
                this.updateObj.id = ''
            },
            ...mapActions(['getFindResourceTree','getDelResource','getAddResource','getUpdateResource','getFindOneResource'])
        }
    }

</script>

<style scoped>
    .resource {
        width: 100%;
        display: flex;
        justify-content: center;
        min-height: 600px;
        height: 100%;
        overflow: hidden;
    }
    
    .main {
        width: 96%;
        min-height: 600px;
        height: 100%;
        border: 1px solid #8492a6;
        border-top: 2px solid #58b7ff;
        border-radius: 3px;
        box-shadow: 0px 5px 5px #d3dce6;
        margin-bottom: 40px;
        overflow: hidden;
    }
    
    .nav {
        height: 50px;
        width: 100%;
        border-bottom: 1px solid #8492a6;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }
    
    .addRole {
        line-height: 32px;
        width: 120px;
        height: 33px;
        margin-right: 40px;
        text-align: center;
        background-color: #fafafa;
        color: #000;
        font-size: 13px;
        border: 1px solid #ddd;
        border-radius: 3px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .addRole span {
        font-size: 12px;
        margin-right: 5px;
    }
    
    .cont {
        width: 100%;
        min-height: 550px;
        height: 100%;
        display: flex;
    }
    
    .Conttree {
        width: 210px;
        min-height: 550px;
        border-right: 1px solid #d3dce6;
        padding-left: 5px;
        padding-right: 5px;
        padding-bottom: 15px;
        padding-top: 5px;
    }
    
    .allConttree {
        width: 100%;
        border: 1px solid #ccc;
        border-radius: 3px;
        cursor: pointer;
        margin-bottom: 5px;
        height: 30px;
        text-align: center;
        font-size: 16px;
        line-height: 30px;
    }
    
    .ContMain {
        margin-left: 20px;
        width: calc(100% - 240px);
        border: 1px solid #d3dce6;
        min-height: 500px;
    }
    
    .ContMain>ul>li {
        display: flex;
        height: 45px;
        border-bottom: 1px solid #ccc;
        line-height: 45px;
        overflow: hidden;
    }
    
    .ContMain>ul>li>div {
        border-left: 1px solid #ccc;
        text-align: center;
    }
    
    .ContMain>ul>li>div:nth-child(1) {
        width: 10%;
        min-width: 68px;
    }
    
    .ContMain>ul>li>div:nth-child(2) {
        width: 15%;
        min-width: 130px;
    }
    
    .ContMain>ul>li>div:nth-child(3) {
        width: 30%;
        min-width: 200px;
    }
    
    .ContMain>ul>li>div:nth-child(4) {
        width: 18%;
        min-width: 125px;
    }
    
    .ContMain>ul>li>div:nth-child(5) {
        width: 33%;
        min-width: 305px;
        overflow: hidden;
    }
    
    .ContMain>ul>li>div:nth-child(1) {
        border-left: 0;
    }
    
    .ContMain>ul .nullLi>div:nth-child(1) {
        width: 100%;
        height: 45px;
        text-align: center;
    }
    
    .ContMain>ul .firstLi {
        background-color: #e5e9f2;
    }
    
    .ContMain>ul dataLi {
        border: 1px solid red;
    }
    
    .ContMain .lastLi {
        display: flex;
        align-items: center;
        overflow: hidden;
    }
    
    .ContMain .lastLi>div:nth-child(1) {
        width: 90%;
        border: 0;
        margin-top: 20px;
    }
    
    .ContMain .lastLi>div:nth-child(2) {
        width: 10%;
        border: 0;
    }
    
    .dataLi > div:last-child {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .dataLi > div:last-child small {
        cursor: pointer;
        border: 1px solid #ddd;
        color: #666;
        font-size: 13px;
        display: inline-block;
        min-width: 55px;
        margin-right: 5px;
        margin-left: 5px;
        height: 27px;
        line-height: 27px;
        overflow: hidden;
        border-top-left-radius: 15px;
        border-bottom-left-radius: 15px;
        border-top-right-radius: 15px;
        border-bottom-right-radius: 15px;
        color: #fff;
    }
    
    .dataLi > div:last-child small:nth-child(1) {
        background-color: #f8b252;
    }
    
    .dataLi > div:last-child small:nth-child(2) {
        background-color: #ef7383;
    }
    
    .dataLi > div:last-child small:nth-child(3) {
        background-color: #58b7ff;
        width: 130px;
    }
    
    .dataLi > div:last-child small:nth-child(4) {
        background-color: #58b7ff;
    }
    
    .dataLi > div:last-child small span {
        font-size: 12px;
        margin-right: 3px;
        color: #fff;
    }
    
    .elbut {
        color: #fff;
        margin: 0;
        padding: 0;
    }
    /*修改资源*/
    
    .findRolePopup {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.3);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10000000000000;
    }
    
    .findRoleP {
        width: 450px;
        min-height: 200px;
        background-color: #fff;
        border-radius: 5px;
    }
    
    .findRoleShow {
        display: none;
    }
    /*添加资源*/
    
    .addRolePopup {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.3);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10000000000000;
    }
    
    .addRoleP {
        width: 450px;
        min-height: 200px;
        background-color: #fff;
        border-radius: 5px;
    }
    
    .addPTitle {
        width: 100%;
        height: 50px;
        font-size: 20px;
        text-align: center;
        font-weight: 600;
        line-height: 50px;
        border-bottom: 1px solid #ccc;
    }
    
    .addPLi {
        display: flex;
        height: 60px;
        display: flex;
        align-items: center;
        margin-top: 5px;
        margin-bottom: 5px;
    }
    
    .addPLi>div:nth-child(1) {
        width: 150px;
        text-align: right;
        padding-right: 15px;
        font-size: 15px;
    }
    
    .addPLi>div:nth-child(2) input {
        width: 280px;
        height: 35px;
        border: 1px solid #ccc;
        border-radius: 3px;
        line-height: 35px;
        padding-left: 5px;
    }
    
    .butLi {
        display: flex;
        justify-content: flex-end;
        height: 60px;
        width: 100%;
        align-items: center;
        border-top: 1px solid #ccc;
    }
    
    .butLi>div {
        width: 90px;
        height: 35px;
        border: 1px solid #ccc;
        border-radius: 3px;
        line-height: 35px;
        font-size: 15px;
        text-align: center;
        margin-left: 10px;
        margin-right: 10px;
        cursor: pointer;
    }
    
    .addRoleShow {
        display: none;
    }
    /*资源详情*/
    
    .updateRolePopup {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.3);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1000;
    }
    
    .updateRoleP {
        width: 450px;
        min-height: 200px;
        background-color: #fff;
        border-radius: 5px;
    }
    
    .updateRoleShow {
        display: none;
    }
    
    .slide-fade-enter-active {
        transition: all 0.7s ease;
    }
    
    .slide-fade-enter,
    .slide-fade-leave-active {
        transform: translateY(-30px);
        opacity: 0;
    }
</style>